package org.ch02.sk.demo01;

import java.lang.reflect.Array;

/**
 * @author XCH
 * @date 2025 - 03 - 19
 */
public class MainTest {
    public static void main(String[] args) {
        Object arr = Array.newInstance(int.class, 4);
        Array.set(arr, 0, 100);
        Array.set(arr, 1, 100);
        Array.setInt(arr, 2, 300);
        Array.set(arr, 3, 100);
        System.out.println(Array.get(arr, 0));
        System.out.println(Array.get(arr, 1));
        System.out.println(Array.get(arr, 2));
        System.out.println(Array.get(arr, 3));
    }
}
